<div class="tableform" id="order_cost">
	<input type="hidden" name='order_id' value="<{$order_id}>"/>
	<div class="division" id="confirm_cost_freight">
	    <{if $status == '1' && !$no_freight}>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<th align='right'><{t}>估算配送费用：<{/t}></th>
				<td align='left'><{if $cost_freight_estimate}><{$cost_freight_estimate|cur}><{else}>0<{/if}></td>
			</tr>
			<tr>
				<th><{t}>配送费用：<{/t}></th>
				<td><input name="cost_freight" value="<{if $cost_freight}><{$cost_freight}><{else}><{$cost_freight_estimate}><{/if}>"/></td>
			</tr>
		</table>
		<div class="table-action">
			<{button label=$___b2c="保存"|t:'b2c' id="btn_do_submit"}>
		</div>
		<{elseif $status == '0'}>
		<div class="">
			<{t}>当前状态不可确认运费<{/t}>
		</div>
		<{else}>
			<{t}>运费已确认<{/t}>
		<{/if}>
	</div>
</div>

<{if $status == 1}>
<script>
	window.addEvent('domready',function(){	
		$('btn_do_submit').addEvent('click', function(){
			new Request({
				url:'index.php?app=b2c&ctl=admin_order&act=save_cost_freight',
				data:$('order_cost'),
				method:'post',
				onSuccess:function(response){
					if (response == 'success'){
						MessageBox.success('<{t}>操作成功<{/t}>');
						$('confirm_cost_freight').innerHTML = '<div class=""><{t}>运费已确认<{/t}></div>';
					}else{
					    var meg = JSON.decode(response);
					    MessageBox.error('<{t}>'+meg.error+'<{/t}>');
					}
				}
			}).send();
		});
	});
</script>
<{/if}>